import requests
import execjs
with open("demo.js","r",encoding="utf-8") as f:
    js_code=f.read()

js_com=execjs.compile(js_code)


headers = {
    "accept": "application/json, text/plain, */*",
    "accept-language": "zh-CN,zh;q=0.9,en;q=0.8,ar;q=0.7",
    "cache-control": "no-cache",
    "content-type": "application/x-www-form-urlencoded;charset=UTF-8",
    "origin": "https://www.up678.com",
    "platformid": "1",
    "pragma": "no-cache",
    "priority": "u=1, i",
    "referer": "https://www.up678.com/school",
    "sec-ch-ua": "\"Not)A;Brand\";v=\"8\", \"Chromium\";v=\"138\", \"Microsoft Edge\";v=\"138\"",
    "sec-ch-ua-mobile": "?0",
    "sec-ch-ua-platform": "\"Windows\"",
    "sec-fetch-dest": "empty",
    "sec-fetch-mode": "cors",
    "sec-fetch-site": "same-origin",
    "terminalid": "1",
    "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36 Edg/138.0.0.0"
}
cookies = {
    "Hm_lvt_f2ffcbb8379fdd509874378893c03b95": "1752113033",
    "Hm_lpvt_f2ffcbb8379fdd509874378893c03b95": "1752113033",
    "HMACCOUNT": "3074E62CD4844F59",
    "SERVERID": "78145c115898bd692a8d20971cd48b05|1752113040|1752113032"
}
url = "https://www.up678.com/dataserver/school/list"
data = {
    "keywords": "清华大学",
    "provinces": "",
    "type": "",
    "properties": "",
    "times": "",
    "yxts": "",
    "pageNo": "1",
    "_t": "1752113044312"
}
response = requests.post(url, headers=headers, cookies=cookies, data=data)
data=response.json()['data']
datas=response.json()['datas']
json_data=js_com.call("dec",data)
json_datas=js_com.call("dec",datas)
print("data:::",json_data)
print("datas:::",json_datas)